/*
 * @Description: 
 * @Author: zyh
 * @Date: 2024-10-15 15:46:16
 * @LastEditors: zyh
 * @LastEditTime: 2024-10-15 19:46:42
 * six bro???
 */
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Test10{
  public static void main(String[] args) throws Exception{
        BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(new File("D:\\??\\java\\HomewokTotal\\File\\File_GBK.txt")),"GBK"));
        BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File("D:\\??\\java\\HomewokTotal\\File\\File_UTF8.txt")),"UTF-8"));
        //????
        String line;
        while ((line=br.readLine())!=null) {
            System.out.println("??????"+line);
            //????
            bw.write(line);
            if (br.ready()) {
                //ready????false?????????
                bw.newLine();//???????
            }
        }
        bw.close();
        br.close();
    }
}
